import {NgModule, ErrorHandler} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {IonicApp, IonicModule, IonicErrorHandler} from 'ionic-angular';
import {servicess} from "../provider/service";//发送http请求

import {JsonpModule} from '@angular/http';

import {FormsModule} from '@angular/forms'; //引入表单模块


//省市区三级联动
import {CityPickerModule} from  "ionic2-city-picker";
import {CityPickerService} from '../provider/city-picker';	//联动的一个单独服务
import {HttpModule} from '@angular/http';

import {MyApp} from './app.component';

import {ContactPage} from '../pages/contact/contact';
import {HomePage} from '../pages/home/home';
import {TabsPage} from '../pages/tabs/tabs';

import {PassCountPage} from '../pages/person/bypassCount/passCount';
import {ProductInfoPage} from '../pages/home/ProductInfo/ProductInfo';

import {StatusBar} from '@ionic-native/status-bar';
import {SplashScreen} from '@ionic-native/splash-screen';
import {PersonPage} from "../pages/person/person";
import {addTrenchPage} from '../pages/contact/addTrench/addTrench';
//三级跳转，添加已存在经销商客户
import {inexistDealerPage} from '../pages/contact/addTrench/inexistDealer/inexistDealer';
import {existDealerPage} from "../pages/contact/addTrench/existDealer/existDealer"

import {StoragePage} from "../pages/storages/storage/storage";
import {services} from "../providers/service";
import {NewCreatPage} from "../pages/storages/newcreat/newcreat";
import {ModifyPswPage} from "../pages/modifyPsw/modifyPsw";
import {CollectPage} from "../pages/storages/collect/collect";
import {ResultPage} from "../pages/storages/result/result";
import {ManagementPage} from "../pages/storages/management/management";
import {PopOverPage} from "../pages/storages/popoverPage/popoverPage";
import {KcmodelPage} from "../pages/storages/ckmodel/kcmodel";
import {ActiveModelPage} from "../pages/activeModel/activeModel";
import {CjStatusPage} from "../pages/storages/cjStatus/cjStatus";
//不存在经销商页面产品信息页面
import {productPage} from '../pages/contact/addTrench/inexistDealer/productPage/productPage';
import {productPage2} from '../pages/contact/addTrench/existDealer/productPage/productPage2';


import {ChildPage} from "../pages/child/child";
import {AddChildPage} from "../pages/addChild/addChild";
import {requestOptionsProvider} from "../provider/default-request-options.service";
import {conProductPage} from "../pages/contact/conProductPage/productPage";
import {Camera} from '@ionic-native/camera';
import {BarcodeScanner} from "@ionic-native/barcode-scanner";
import {CjDelStatusPage} from "../pages/storages/cjDelStatus/cjDelStatus";
import {AppExit} from "../util/exit";
import {AppPopup} from "../util/popup";
import {OuterService} from "../pages/storages/provider/storage-service";
import {Network} from "@ionic-native/network";
import {NetworkBar} from "../util/network-bar/network-bar";
import {UserService} from "../providers/user-service";
import {HomeService} from "../providers/home-service";
import {StorageService} from "../providers/storage-service";


import {FindPwd} from "../modules/app-user/find-pwd/find-pwd";
import {UserLogin} from "../modules/app-user/user-login/user-login";
import {AppHttp} from "../util/http";
import {Device} from "@ionic-native/device";
import {UserDetail} from "../modules/app-user/user-detail/user-detail";
import {ModifyUser} from "../modules/app-user/modify-user/modify-user";



@NgModule({
    imports: [
        HttpModule,
        JsonpModule,
        BrowserModule,
        CityPickerModule,
        FormsModule,
        IonicModule.forRoot(MyApp, {tabsHideOnSubPages: 'true',})
    ],
    declarations: [
        MyApp,
        StoragePage,
        ContactPage,
        HomePage,
        TabsPage,
        PersonPage,

        UserLogin, FindPwd, UserDetail, ModifyUser,

        PassCountPage,
        ProductInfoPage,
        addTrenchPage,
        inexistDealerPage,
        productPage,
        existDealerPage,
        productPage2,
        NewCreatPage,
        ModifyPswPage,
        CollectPage,
        ResultPage,
        ManagementPage,
        PopOverPage,
        KcmodelPage,
        ActiveModelPage,
        CjStatusPage,
        ChildPage,
        AddChildPage, conProductPage,
        CjDelStatusPage,
        NetworkBar
    ],

    bootstrap: [IonicApp],
    entryComponents: [
        MyApp,
        StoragePage,
        ContactPage,
        HomePage,
        TabsPage,
        PersonPage,

        UserLogin, FindPwd, UserDetail, ModifyUser,

        PassCountPage,
        ProductInfoPage,
        addTrenchPage,
        inexistDealerPage,
        productPage,
        existDealerPage,
        productPage2,


        NewCreatPage,
        ModifyPswPage,
        CollectPage,
        ResultPage,
        ManagementPage,
        PopOverPage,
        KcmodelPage,
        ActiveModelPage,
        CjStatusPage,
        ChildPage,
        AddChildPage, conProductPage,  //经销商页面的input框中产品信息
        CjDelStatusPage,
        NetworkBar
    ],
    providers: [
        UserService,
        HomeService,
        AppHttp,
        StorageService,

        Device,

        StatusBar,
        SplashScreen,
        {provide: ErrorHandler, useClass: IonicErrorHandler},
        CityPickerService,
        services, servicess, requestOptionsProvider,
        Camera, BarcodeScanner, AppExit, AppPopup,
        OuterService, Network
    ]
})
export class AppModule {
}
